import Layout from '../components/Loyout'
let routes = [
  {
    path: '/',
    component: Layout,
    redirect: { path: '/dashboard' },
    meta: {
      title: '根目录',
      icon: 'icon-xianxingdingdan',
      hidden: true
    },
    children: [
      {
        path: 'dashboard',
        name: 'dashboard',
        meta: {
          title: '仪表盘',
          icon: 'icon-xianxinggongzuo'
        },
        component: () => import('../views/dashboard')
      },
    ]
  },
  {
    path: '/system',
    component: Layout,
    name: 'system',
    meta: {
      title: '系统设置',
      icon: 'icon-xianxinghuiyuan'
    },
    children: [
      {
        path: 'users',
        meta: {
          title: '用户设置',
          icon: 'icon-neiyi'
        },
        component: () => import('../views/users'),
      },
      {
        path: 'role',
        name: 'role',
        meta: {
          title: '角色设置',
          icon: 'icon-mianxingtingzhibofang'
        },
        component: () => import('../components/Role')
      },
      {
        path: 'userRole',
        meta: {
          title: '用户角色',
          icon: 'icon-xianxingmima'
        },
        component: () => import('../components/UserRole')
      },

    ]
  },
  {
    path: '/login',
    component: () => import('../views/login'),
    meta: {
      title: '登录',
      hidden: true

    }
  },
  {
    path: '/aaa',
    component: () => import('../views/aaa'),
    meta: {
      title: 'a',
    }
  }

]

export default routes
